Requirements for the Jigsaw Puzzle

Learn about all requirements of the jigsaw puzzle problem.

We'll cover the following

In this lesson, we’ll list down the requirements of our jigsaw puzzle problem. This is a very crucial step since requirements define the scope of a problem, so getting them right from the interviewer and understanding them well will make the design of the rest of the problem smooth and easy.

We’ll use the notational convention to identify each requirement with a unique label "Rn", where "R" is short for Requirement and "n" is a natural number.

Requirement collection#

For the jigsaw puzzle problem, the requirements are defined below:

R1: Our board will be in the shape of a rectangle.

R2: All pieces will have four sides that can either have an indentation, an extrusion, or a flat edge.

R3: There are four corner pieces, some edge pieces, and the remaining ones are the middle pieces. A corner piece has two flat sides, an edge piece only has one flat side, and a middle piece doesn’t have any flat edge.

Corner Piece
Corner Piece
Middle Piece
Middle Piece
Edge Piece
Edge Piece
Flat Edge
Flat Edge
Extrusion
Extrus...
Indentation
Indent...
Viewer does not support full SVG 1.1

R4: All pieces will be unique, so only one piece will fit with one other piece.

R5: Two pieces fit together by the curvature of the indentation on one piece matching up to the curvature of the extrusion on another.

We've identified our requirements for the problem, and in the next lesson, we will define the class diagram of our jigsaw puzzle system.

Getting Ready: Jigsaw Puzzle

Class Diagram for the Jigsaw Puzzle